//package com.hayabusa.util;/*
// * @author Hayabusa
// * @date  2021/3/31 18:25
// * @Email:2682557218@qq.com
// */
//
//import org.apache.ibatis.io.Resources;
//import org.apache.ibatis.session.SqlSession;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.apache.ibatis.session.SqlSessionFactoryBuilder;
//
//import java.io.IOException;
//import java.io.InputStream;
//
//public class BatisUtil {
//    public static SqlSession getSession() throws IOException {
//        String resource = "mybatis-config.xml";
//        InputStream inputStream = Resources.getResourceAsStream(resource);
//        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
//        return sqlSessionFactory.openSession();
//    }
//
//    public static void close(SqlSession sqlSession){
//        if(null!=sqlSession){
//            sqlSession.close();
//        }
//    }
//}
